#ifndef _SHADER_H_
#define _SHADER_H_

#include <GL/glew.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>

bool initGLSL();

class Shader
{
public:
	//Shader();
	Shader(char* vert_file, char *frag_file);
    Shader(char* frag_file);
	void use();
	
	void setUniform1i(char* name, GLuint val);
	void setUniform3f(char* name, float x1, float x2, float x3);
	void setUniform3fv(char* name, int count, float *x1);    
    GLhandleARB getHandle();
	
private:
	GLhandleARB handle;
};

GLhandleARB loadShader(char* filename, unsigned int type);
GLhandleARB loadProgram(char* vert_filename, char* frag_filename);

void setUniform1i(GLhandleARB h, char* name, GLuint val);

#endif
